package Test;

import static org.junit.Assert.*;

import org.junit.*;
import ControlLayer.*;
import ModelLayer.*;

public class PersonTest {
	private Person person;
	private PersonCtr personCtr;

	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
	}

	@AfterClass
	public static void tearDownAfterClass() throws Exception {
	}

	@Before
	public void setUp() throws Exception {
		personCtr = new PersonCtr();
	}

	@After
	public void tearDown() throws Exception {
	}

	//
	// @Test
	// public void testInsertAndGetPerson() {
	// int guestId = personCtr.createGuest("Sam", "Smith", "Oktobervej 1",
	// "Denmark", "43567890", "asjd@hotmail.com", "Guest", "A12366",
	// 0, 0);
	// int employeeId = personCtr.createEmployee("Fay", "Stay", "SunnyRoad 4",
	// "Morroco", "4563456", "stjy@gmail.com", "Employee",
	// "23565589535", "Receptionist");
	// // int personId = personCtr.insertPerson("Test Maria", "Test Brown",
	// // "Test street 345", "Test country", "123456789", "Test email",
	// // "Guest");
	// // Person person = personCtr.getPerson(personId);
	// try {
	// Assert.assertEquals(guestId, personCtr.getPerson(guestId));
	// Assert.assertEquals(employeeId, personCtr.getPerson(employeeId));
	// // Assert.assertEquals(personId, personCtr.getPerson(personId));
	// } catch (PersonException e) {
	// // TODO Auto-generated catch block
	// e.printStackTrace();
	// }
	//
	// personCtr.deleteGuest(guestId);
	// personCtr.deleteEmployee(employeeId);
	// // personCtr.deletePerson(personId);
	// }
	//
	// @Test
	// public void testUpdatePerson() {
	// int guestId = personCtr.createGuest("Sam", "Smith", "Oktobervej 1",
	// "Denmark", "43567890", "asjd@hotmail.com", "Guest", "A12366",
	// 0, 0);
	// int employeeId = personCtr.createEmployee("Fay", "Stay", "SunnyRoad 4",
	// "Morroco", "4563456", "stjy@gmail.com", "Employee",
	// "23565589535", "Receptionist");
	// // int personId = personCtr.insertPerson("Test Maria", "Test Brown",
	// // "Test street 345", "Test country", "123456789", "Test email",
	// // "Guest");
	// // personCtr.insertPerson("Test Maria", "Test Brown", "Test street 345",
	// // "Test country", "123456789", "Test email", "Guest");
	// Person newprs = new Person();
	// newprs.setAddress("Test address 1");
	// // newprs.setAuthLevel(personId);
	// newprs.setCountry("Test country 1");
	// newprs.setEmail("Test email 1");
	// newprs.setfName("Test new name");
	// newprs.setPassword("new password");
	// newprs.setPhone("Test new phone");
	// newprs.setPtype(KeyWord.Guest);
	// // personCtr.updateDBPerson(newprs);
	// // Person person = personCtr.getPerson(personId);
	// try {
	// Assert.assertEquals(guestId, personCtr.getPerson(guestId));
	// Assert.assertEquals(employeeId, personCtr.getPerson(employeeId));
	// // Assert.assertEquals(personId, personCtr.getPerson(personId));
	// } catch (PersonException e) {
	// // TODO Auto-generated catch block
	// e.printStackTrace();
	// }
	//
	// personCtr.deleteGuest(guestId);
	// personCtr.deleteEmployee(employeeId);
	// // personCtr.deletePerson(personId);
	// }
	//
	// @Test
	// public void testDeletePerson() {
	// int guestId = personCtr.createGuest("Sam", "Smith", "Oktobervej 1",
	// "Denmark", "43567890", "asjd@hotmail.com", "Guest", "A12366",
	// 0, 0);
	// int employeeId = personCtr.createEmployee("Fay", "Stay", "SunnyRoad 4",
	// "Morroco", "4563456", "stjy@gmail.com", "Employee",
	// "23565589535", "Receptionist");
	// // int personId = personCtr.insertPerson("Test Maria", "Test Brown",
	// // "Test address", "Test country", "123456789", "Test email",
	// // "Guest");
	// // Assert.assertEquals(1, personCtr.deletePerson(guestId));
	// // Assert.assertEquals(employeeId,
	// // personCtr.deleteEmployee(employeeId));
	// // Assert.assertEquals(personId, personCtr.deletePerson(personId));
	// }

	@Test
	public void testCreateGuest() {
		int guestId = personCtr.createGuest("Sam", "Smith", "Oktobervej 1",
				"Denmark", "43567890", "asjd@hotmail.com", "Guest", "A12366",
				0, 0);
		// Assert.assertEquals(1, personCtr.deletePerson(guestId));
	}

	@Test
	public void testUpdateGuestRoom() {
		fail("Not yet implemented");
	}

	@Test
	public void testUpdateGuest() {
		fail("Not yet implemented");
	}

	@Test
	public void testDeleteGuest() {
		fail("Not yet implemented");
	}

	@Test
	public void testGetTotakGuest() {
		fail("Not yet implemented");
	}

	@Test
	public void testCreateEmployee() {
		fail("Not yet implemented");
	}

	@Test
	public void testUpdateEmplyee() {
		fail("Not yet implemented");
	}

	@Test
	public void testDeleteEmployee() {
		fail("Not yet implemented");
	}

	@Test
	public void testGetTotalEmployees() {
		fail("Not yet implemented");
	}

	@Test
	public void test() {
		fail("Not yet implemented");
	}

}
